<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 伪类 */
        /* ul第一个元素 */
        ul li :first-child{
        background-color: aqua;
        }
        /* 选中p1：定位到父元素(body)，选择当前第一个元素 */
        p:nth-child(1){
            background-attachment: fixed;
        }
        /* 选中父元素，下的p元素 */
        p:nth-of-type(2){
            background-color: blue;
        }
    </style>
</head>
<body>
    <p>p1</p>
    <p>p1</p>
    <p>p1</p>
    <ul>
        <li>l1</li>
        <li>l1</li>
        <li>l1</li>
    </ul>
</body>
</html>